#/bin/bash

threads="1 2 4 8 12 16 20 24 28"
grans=64

# DRAM
for t in $threads; do
    taskset -c 0-17,36-53 ./bandwidth -i 0 -t $t -g $grans -p 1 | tee -a dram_seqr.txt
done

for t in $threads; do
    taskset -c 0-17,36-53 ./bandwidth -i 6 -t $t -g $grans -p 1 | tee -a dram_seqw.txt
done

for t in $threads; do
    taskset -c 0-17,36-53 ./bandwidth -i 7 -t $t -g $grans -p 1 | tee -a dram_rndr.txt
done

for t in $threads; do
    taskset -c 0-17,36-53 ./bandwidth -i 13 -t $t -g $grans -p 1 | tee -a dram_rndw.txt 
done

# PMEM
# for t in $threads; do
#     taskset -c 0-17,36-53 ./bandwidth -i 0 -t $t -g $grans -p 0 | tee -a pmem_seqr.txt
# done

# for t in $threads; do
#     taskset -c 0-17,36-53 ./bandwidth -i 6 -t $t -g $grans -p 0 | tee -a pmem_seqw.txt
# done

# for t in $threads; do
#     taskset -c 0-17,36-53 ./bandwidth -i 7 -t $t -g $grans -p 0 | tee -a pmem_rndr.txt
# done

# for t in $threads; do
#     taskset -c 0-17,36-53 ./bandwidth -i 13 -t $t -g $grans -p 0 | tee -a pmem_rndw.txt 
# done